﻿using Sidvall.Serialization;

namespace Sidvall.Web.IO.Data
{
    public class StoreResourceItem
    {
        #region Public Members

        public Sidvall.Security.ResourceItemCollection ResourceItems { get; set; }
        public Sidvall.Web.IO.Store Store { get; set; }

        #region ToString

        public override string ToString()
        {
            if (this.Store != null)
            {
                if (this.ResourceItems != null)
                    return this.Store.ToString().Append(this.ResourceItems.ToString(), ": ");
                else
                    return this.Store.ToString();
            }
            else if (this.ResourceItems != null)
            {
                return this.ResourceItems.ToString();
            }
            return string.Empty;
        }

        #endregion

        #endregion
    }
}
